home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / WWW / Library / Implementation / HTAuth.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-28  |  1.7 KB  |  67 lines

  1. /*                                   AUTHENTICATION MODULE
  2.                                              
  3.    This is the authentication module. By modifying the function HTAA_authenticate() it can
  4.    be made to support external authentication methods.
  5.    
  6.  */
  7.  
  8. #ifndef HTAUTH_H
  9. #define HTAUTH_H
  10.  
  11. #ifndef HTUTILS_H
  12. #include "HTUtils.h"
  13. #endif /* HTUTILS_H */
  14. #include "HTAAUtil.h"
  15. #include "HTAAProt.h"
  16.  
  17.  
  18. #ifdef SHORT_NAMES
  19. #define HTAAauth        HTAA_authenticate
  20. #endif /* SHORT_NAMES */
  21.  
  22.  
  23. /*
  24. ** Server's representation of a user (fields in authentication string)
  25. */
  26. typedef struct {
  27.     HTAAScheme  scheme;         /* Scheme used to authenticate this user */
  28.     char *      username;
  29.     char *      password;
  30.     char *      inet_addr;
  31.     char *      timestamp;
  32.     char *      secret_key;
  33. } HTAAUser;
  34. /*
  35.  
  36. User Authentication
  37.  
  38.  */
  39.  
  40. /* SERVER PUBLIC                                        HTAA_authenticate()
  41. **                      AUTHENTICATE USER
  42. ** ON ENTRY:
  43. **      scheme          used authentication scheme.
  44. **      scheme_specifics the scheme specific parameters
  45. **                      (authentication string for Basic and
  46. **                      Pubkey schemes).
  47. **      prot            is the protection information structure
  48. **                      for the file.
  49. **
  50. ** ON EXIT:
  51. **      returns         NULL, if authentication failed.
  52. **                      Otherwise a pointer to a structure
  53. **                      representing authenticated user,
  54. **                      which should not be freed.
  55. */
  56. PUBLIC HTAAUser *HTAA_authenticate PARAMS((HTAAScheme   scheme,
  57.                                            char *       scheme_specifics,
  58.                                            HTAAProt *   prot));
  59. /*
  60.  
  61.  */
  62.  
  63. #endif /* not HTAUTH_H */
  64. /*
  65.  
  66.    End of file HTAuth.h.  */
  67.